package com.ss.android.article.browser.website;

import android.view.ViewGroup;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.webkit.WebView;

final class f implements ViewTreeObserver.OnPreDrawListener {
    private final a b;
    private final WebView a;

    f(com.ss.android.article.browser.website.a arg1, WebView arg2) {
        this.b = arg1;
        this.a = arg2;

    }

    public final boolean onPreDraw() {
        boolean v0;
        if(com.ss.android.article.browser.website.a.b(this.b).getBottom() <= 0) {
            v0 = true;
        }
        else {
            com.ss.android.article.browser.website.a.b(this.b).getViewTreeObserver().removeOnPreDrawListener(((ViewTreeObserver.OnPreDrawListener)this));
            if(this.a != null) {
                ViewGroup.LayoutParams v0_1 = this.a.getLayoutParams();
                ((ViewGroup.MarginLayoutParams)v0_1).topMargin = com.ss.android.article.browser.website.a.b(this.b).getBottom();
                this.a.setLayoutParams(v0_1);
            }

            v0 = false;
        }

        return v0;
    }
}

